package com.ktgj.pay.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.pay.mapper.InvoiceDeliveryMapper;
import com.ktgj.pay.domain.InvoiceDelivery;
import com.ktgj.pay.service.IInvoiceDeliveryService;

/**
 * 发票配送Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-24
 */
@Service
public class InvoiceDeliveryServiceImpl implements IInvoiceDeliveryService 
{
    @Autowired
    private InvoiceDeliveryMapper invoiceDeliveryMapper;

    /**
     * 查询发票配送
     * 
     * @param deliveryid 发票配送ID
     * @return 发票配送
     */
    @Override
    public InvoiceDelivery selectInvoiceDeliveryById(Long deliveryid)
    {
        return invoiceDeliveryMapper.selectInvoiceDeliveryById(deliveryid);
    }

    /**
     * 查询发票配送列表
     * 
     * @param invoiceDelivery 发票配送
     * @return 发票配送
     */
    @Override
    public List<InvoiceDelivery> selectInvoiceDeliveryList(InvoiceDelivery invoiceDelivery)
    {
        return invoiceDeliveryMapper.selectInvoiceDeliveryList(invoiceDelivery);
    }

    /**
     * 新增发票配送
     * 
     * @param invoiceDelivery 发票配送
     * @return 结果
     */
    @Override
    public int insertInvoiceDelivery(InvoiceDelivery invoiceDelivery)
    {
        return invoiceDeliveryMapper.insertInvoiceDelivery(invoiceDelivery);
    }

    /**
     * 修改发票配送
     * 
     * @param invoiceDelivery 发票配送
     * @return 结果
     */
    @Override
    public int updateInvoiceDelivery(InvoiceDelivery invoiceDelivery)
    {
        return invoiceDeliveryMapper.updateInvoiceDelivery(invoiceDelivery);
    }

    /**
     * 修改发票配送
     *
     * @param invoiceDelivery 发票配送
     * @return 结果
     */
    @Override
    public int updateInvoiceDeliverys(InvoiceDelivery invoiceDelivery)
    {
        return invoiceDeliveryMapper.updateInvoiceDeliverys(invoiceDelivery);
    }

    /**
     * 批量删除发票配送
     * 
     * @param deliveryids 需要删除的发票配送ID
     * @return 结果
     */
    @Override
    public int deleteInvoiceDeliveryByIds(Long[] deliveryids)
    {
        return invoiceDeliveryMapper.deleteInvoiceDeliveryByIds(deliveryids);
    }

    /**
     * 删除发票配送信息
     * 
     * @param deliveryid 发票配送ID
     * @return 结果
     */
    @Override
    public int deleteInvoiceDeliveryById(Long deliveryid)
    {
        return invoiceDeliveryMapper.deleteInvoiceDeliveryById(deliveryid);
    }

    @Override
    public int queryEmailState(Long orderId) {
        return invoiceDeliveryMapper.queryEmailState(orderId);
    }
}
